﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Mars.EnCor.Security;

namespace Mars.EnCor.Config
{
    internal class EnCorConfig : ConfigurationSection
    {
        private const string STR_EnCor = "enCor";
        private const string STR_Modules = "modules";
        private const string STR_Security = "security";

        internal static EnCorConfig GetConfig()
        {
            return (EnCorConfig)ConfigurationManager.GetSection(STR_EnCor);
        }

        [ConfigurationProperty(STR_Modules)]
        public ModuleConfigCollection Modules
        {
            get
            {
                return (ModuleConfigCollection)this[STR_Modules];
            }
        }

        [ConfigurationProperty(STR_Security)]
        public SecurityConfig Security
        {
            get
            {
                return (SecurityConfig)this[STR_Security];
            }
        }
    }
}
